import Vue from 'vue'
import App from './App'

// vuex
import store from './store'

// 引入全局uView
import uView from '@/uni_modules/uview-ui'

import mixin from './common/mixin'
import api from './utils/api.js'
import i18n from './lang'
import {toast,timestampToDateTime,disposeImageUrl,go} from './utils/tools';
import {
	Base64
} from '@/utils/base64'
Vue.prototype.$store = store

Vue.config.productionTip = false
Vue.prototype.$api = api;
Vue.prototype.$go = go;
Vue.prototype.$toast = toast;
Vue.prototype.$toDateTime=timestampToDateTime;
Vue.prototype.$imgSrc=disposeImageUrl;
Vue.prototype.$getUserName = function(val){
	return Base64.decode(val)
}


App.mpType = 'app'
Vue.use(uView)

// #ifdef MP
// 引入uView对小程序分享的mixin封装
const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
// #endif

Vue.mixin(mixin)

const app = new Vue({
	i18n,
    store,
    ...App
})

// 引入请求封装
require('./util/request/index')(app)

app.$mount()
